package cn.edu.scau.cmi.huangjunxi.singleton;

import java.util.ArrayList;


public class Marshal {

	private static final int N = 10;
	private static ArrayList<Marshal> list = new ArrayList<Marshal>(N);
	private String name;
	public static int count=0;

	private Marshal(String name) {
		this.name = name;
	}

	public static void init(String name)
	{
		list.add(new Marshal(name));
		//Marshal.count++;
	}

	public static Marshal getInstance() {
		return list.get(count);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}
